﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Zoom.ascx.cs" Inherits="TTMarketing.ZoomControl.Zoom" %>
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" 
    AutoGenerateRows="False" DataSourceID="ObjectDataSourceHinhAnh" 
    BorderStyle="None" GridLines="None">
    <Fields>
    
        <asp:TemplateField>

        <ItemTemplate>
        <div style="margin-left:-5px;">
            <a class="jqzoom"  title="Product" id="link" href='<%# ImageN(Eval("Name")) %>'>
            <img  src='<%# ImageN(Eval("Name")) %> ' 
                id="image" alt="just nothing"/>
        </a></div>
        </ItemTemplate>
        </asp:TemplateField>
    </Fields>
</asp:DetailsView>
<asp:ObjectDataSource ID="ObjectDataSourceHinhAnh" runat="server" 
    SelectMethod="Image_getByProduct" TypeName="TTController.clsController">
    <SelectParameters>
        <asp:QueryStringParameter Name="prId" QueryStringField="id" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:DataList ID="dtImage" runat="server"
            DataSourceID="ObjectDataSourceHinhAnh" 
            RepeatDirection="Horizontal" RepeatColumns="5" RepeatLayout="Flow" 
    onprerender="btnChoseImg_PreRender">
                <ItemTemplate>
                    <asp:Image ID="btnChoseImg" runat="server" Height="47px" Width="40px" 
                        ImageUrl='<%# Eval("Name") %>' 
                        onprerender="btnChoseImg_PreRender" />
                     
                </ItemTemplate>
                <SelectedItemStyle BackColor="#FF9933" />
            </asp:DataList>